package com.xuecheng.api.cms;

import com.xuecheng.framework.domain.cms.CmsPage;
import com.xuecheng.framework.domain.cms.request.QueryPageRequest;
import com.xuecheng.framework.domain.cms.response.CmsPageResult;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;

@Api(value="cms页面管理接口",description="cms页面管理接口，提供页面的增、删、改、查")
public interface CmsPageControllerApi {
    @ApiOperation("分页查询列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page" ,value = "页码",dataType = "java.lang.Integer",paramType = "path"),
            @ApiImplicitParam(name = "size" ,value = "每页长度",dataType = "java.lang.Integer",paramType = "path")
})
    public QueryResponseResult findList(Integer page, Integer size, QueryPageRequest queryPageRequest);
    @ApiOperation("查询对应siteId所有的别名")
    @ApiImplicitParam(name = "siteId",value = "站点id",dataType = "java.lang.String",paramType = "path" )
    public QueryResponseResult findPageAliase( String siteId);

    @ApiOperation("添加页面")
    @ApiImplicitParam(name = "cmsPage",value = "页面信息",dataType = "com.xuecheng.framework.domain.cms.CmsPage")
    public CmsPageResult add(CmsPage cmsPage);

    @ApiOperation("查询页面通过id")
    @ApiImplicitParam(name = "pageId",value = "页面id",dataType = "java.lang.String",paramType = "path" )
    public CmsPageResult findById(String pageId);

    @ApiOperation("页面修改提交")
    @ApiImplicitParams(
            {       @ApiImplicitParam(name = "pageId" ,value = "页面id",dataType = "java.lang.String",paramType = "path"),
                    @ApiImplicitParam(name = "cmsPage",value = "页面信息",dataType = "com.xuecheng.framework.domain.cms.CmsPage")
            })
    public CmsPageResult update(String pageId,CmsPage cmsPage);

    @ApiOperation("通过ID删除页面")
    public ResponseResult delete(String id);

    @ApiOperation("发布页面")
    public ResponseResult post(String pageId);


}

